<?php 
session_start();
require_once 'header.php';
$webroot="";
require_once 'html/template.php';

function __autoload($className)
	{
    	require_once('class/' . $className . '.class.php');
	}
session::need_member();
$number1=rand(100,1000);
$number2=rand(10,10000);
$result=$number1+$number2;
$operation=$number1." + ".$number2;
$_SESSION["verifyResult"]=$result;
?>
<script type="text/javascript" >
$("#freediv").html("<img scr='images/loading.gif' />");
$.ajax({
	url: "GetCcFree.php",
	type:'post',
	data:"getbatchlr=1",
	cache: false,
	success: function(j){
	$("#freediv").html(j);
	
  	}
});	
function getFreeCC()
{
	$("#freediv").html("<img scr='images/loading.gif' />");
	$.ajax({
		url: "GetCcFree.php",
		type:'post',
		data:"batchLr="+$("#batchlr").val()+"&captchaCode="+$("#captchaCode").val(),
		cache: false,
		success: function(j){
		$("#freediv").html(j);
		
	  	}
	});	
}

</script>
<table border="0">
<tr>
<td>
<b>Payment Batch</b>
</td>
<td>
<input name="batchlr" id="batchlr" type="text" />
</td>
</tr>
<tr>
<td>
</td>
<td>
Put the result of this operation into textbox <br/>
<?php 
echo $operation;
?> 
</td>
</tr>
<tr>
<td><b>
Result</b>
</td>
<td>
<input type="text" name="captchaCode" id="captchaCode" size="12" maxlength="8" />
</td>
</tr>
</table>

<input name="submit" type="submit" value="submit" onclick="javascript:getFreeCC();" />
<div id="freediv" ></div>